#ifndef _AUDIO_H_
#define _AUDIO_H_

class Sound;
#include "vec.hpp"

class Audio
{
public:
	Audio();
	~Audio();

	bool Open();
	void Close();
	
	void Loop(int loops);
	void Pos(float x, float y);
	void Listen(float x, float y);
	int Vol(int vol = -1, int chan = -1);

	int SoundPlay(Sound & sound, int chan = -1);
	void Pause(int chan = -1);
	void Resume(int chan = -1);
	void Stop(int chan = -1);

	int Freq()
	{
		return freq;
	}

private:
	int freq;
	int loop;
	Vec2f playpos;
	Vec2f listen;
};

extern Audio Aud;

#endif
